﻿<?php
	require_once('template/template1.phtml');
?>	
	<h2>Sửa loại sản phẩm</h2>
	<form action='loai_CMS.php?action=EDIT&id=<?php echo $loai['id_loai'];?>' method=post>
		<fieldset>
			<div class="formgroup">
				<dl>
					<dt>
						<label>Tên loại sản phẩm hiện tại<span class="requirefield"> *</span></label>
					</dt>
					<dd>
						<input type="text" name="ten_loai" id="Name" class="required" value="<?php echo $loai['ten_loai']?>">
					</dd>
				</dl>
				<dl>
					<dt>
						<label for="Product_Brand_Id">Thuộc nhóm sản phẩm</label> <span class="requirefield">*</span>
					</dt>
					<dd>
						<select name="id_nhom" id="Product_Brand_Id" class="required">
							
<?php
				foreach($nhom as $value){
					if ($loai['id_nhom'] != $value['id_nhom'])
						echo	"<option value='{$value['id_nhom']}'>{$value['ten_nhom']} </option>";
					else
						echo	"<option selected='selected'  value='{$value['id_nhom']}'>{$value['ten_nhom']} </option>";
				}
?>
						</select>
					</dd>
				</dl>
			</div>
		</fieldset>
		<fieldset class="action">
			<input type="submit" name="submit" value="Sửa">
			<input type="reset" value="Reset">
			<input type="button" onclick="history.back()" value="Hủy">
		</fieldset>
	</form>
		
	
	
<?php	
	require_once('template/template2.phtml');
?>